<!--高顺-->


<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/static/css/gs/bootstrap.min.css">

    <script type="text/javascript" src="/static/js/jquery-1.8.3.js"></script>
</head>

<style>
    input.error{
        border: 1px solid #E6594E;
    }
</style>
<body>
<div class="container" id="app">
    <form id="addUserForm">
        <br/>
        <div  class="form-group">
            <label for="applyCause">拒绝原因：</label>
            <input type="text" class="form-control" id="applyCause" name="applyCause" placeholder="请输入拒绝原因">
        </div>
        <div>
            <button type="button" id="saveBtn" class="btn btn-success">提交</button>
            <button type="button" id="cancelBtn" class="btn btn-default">取消</button>
        </div>
    </form>
</div>

<script>
    $("#saveBtn").click(function () {
        var applyCause=$("#applyCause").val();
        if (applyCause!=''){
            $.ajax({
                url:'/apply/updataApplyStateNo',
                dataType:'json',
                type:'post',
                data:{
                    applyCause:$("#applyCause").val()
                },success:function () {
                    quxiao();
                }
            })
            return true;
        } else {
            $('#applyCause')[0].style.border="1px solid red";
            return false;
        }

    })
    var quxiao=function(){
        var index=parent.layer.getFrameIndex(window.name);
        parent.getTeacherPageList();
        parent.layer.close(index);
    }

    $("#cancelBtn").click(function () {
        quxiao();
    })

</script>
</body>
</html>